//
//  ViewController.swift
//  TestConfig
//
//  Created by shinho on 2021/4/29.
//

import UIKit

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view.
    }

    override func viewDidAppear(_ animated: Bool) {
        
        if AppConfig.currentTarget == AppConfig.AppTargetType.TestConfig{
            if AppConfig.currentConfig == AppConfig.AppConfigType.Debug {
                view.backgroundColor = .red
            } else if AppConfig.currentConfig == AppConfig.AppConfigType.ReleaseTest {
                view.backgroundColor = .blue
            } else if AppConfig.currentConfig == AppConfig.AppConfigType.Release {
                view.backgroundColor = .green
            }
        } else if AppConfig.currentTarget == AppConfig.AppTargetType.TestConfig_Copy {
            if AppConfig.currentConfig == AppConfig.AppConfigType.Debug {
                view.backgroundColor = .gray
            } else if AppConfig.currentConfig == AppConfig.AppConfigType.ReleaseTest {
                view.backgroundColor = .brown
            } else if AppConfig.currentConfig == AppConfig.AppConfigType.Release {
                view.backgroundColor = .black
            }
        } else {
            if AppConfig.currentConfig == AppConfig.AppConfigType.Debug {
                view.backgroundColor = .cyan
            } else if AppConfig.currentConfig == AppConfig.AppConfigType.Release {
                view.backgroundColor = .purple
            } else if AppConfig.currentConfig == AppConfig.AppConfigType.ReleaseTest {
                view.backgroundColor = .yellow
            }
        }
    
    }

}

